<template>
  <button @click="emitEvent">发射事件</button>
</template>

<script setup>
import { EventBus } from '../utils/event-bus.js';

const emitEvent = () => {
  EventBus.emit('my-event', '这是来自组件A的消息');
};
</script>